<template>
  <div>
    <div :id="id" :style="{width:width,height:height}"></div>
  </div>
</template>
<script>
export default {
    data() {
        return {
            mychart:'',
        }
    },
  props: ["id", "width", "height", "option"],
  mounted() {
    this.myChart = this.$echarts.init(document.getElementById(this.id));
    // var myChart = echarts.init(chartDom);
    this.myChart.setOption(this.option);
  },
};
</script>
